//
//  AddressCell.m
//  Zhiche-Carriage
//
//  Created by LeeBruce on 16/6/14.
//  Copyright © 2016年 LeeBruce. All rights reserved.
//

#import "AddressCell.h"
#import <Masonry.h>

@implementation AddressCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self initSubViews];
    }
    
    return self;
}

-(void)initSubViews
{
    __weak typeof(self) weakSelf = self;
    
    self.imageV = [[UIImageView alloc]init];
    [self.contentView addSubview:self.imageV];
    [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.mas_equalTo(18);
        make.centerY.equalTo(weakSelf);
        make.size.mas_equalTo(CGSizeMake(12, 16));
        
        
    }];
    
    
    UILabel *label = [[UILabel alloc]init];
    [self.contentView addSubview:label];
    label.backgroundColor = LineGrayColor;
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.mas_equalTo(weakSelf.imageV.mas_right).offset(7);
        make.centerY.equalTo(weakSelf);
        make.size.mas_equalTo(CGSizeMake(0.5, 100 * kHeight - 21 * kHeight));
        
    }];
    
    
    
    self.firstLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.firstLabel];
    [self.firstLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.mas_equalTo(weakSelf.imageV.mas_right).offset(14);
        make.top.mas_equalTo(14 * kHeight);
        make.size.mas_equalTo(CGSizeMake(screenWidth - 60, 15 * kHeight));
    }];
    self.firstLabel.font = Font(13);
    self.firstLabel.textColor = littleBlackColor;
    self.firstLabel.text = @"北京－海淀";
    
    
    self.secondLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.secondLabel];
    [self.secondLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.imageV.mas_right).offset(14);
        make.top.mas_equalTo(weakSelf.firstLabel.mas_bottom).offset(13.5 * kHeight);
        make.size.equalTo(weakSelf.firstLabel);
    }];
    self.secondLabel.font = Font(13);
    self.secondLabel.textColor = littleBlackColor;

    self.secondLabel.text = @"北京市海淀区海淀西路新浪大厦";
    
    self.thirdLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.thirdLabel];
    [self.thirdLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.imageV.mas_right).offset(14);
        make.top.mas_equalTo(weakSelf.secondLabel.mas_bottom).offset(13.5 * kHeight);
        make.size.equalTo(weakSelf.firstLabel);
    }];
    self.thirdLabel.font = Font(13);
    self.thirdLabel.textColor = littleBlackColor;
    self.thirdLabel.text = @"hellokitty   15555555555";

    
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
